<div>
  <div class="d-input" *ngIf="this.data.title == '报工记录'">
    <input dTextInput style="width: 150px"  [error]="false" placeholder='工单号'  name="工单号" [(ngModel)]="this.filter.JobOrderNum" class="me-3">
    <input dTextInput style="width: 150px;margin-left: 8px"  [error]="false" placeholder='人员姓名/编码'  name="人员姓名/编码" [(ngModel)]="this.filter.EmployeeCodeName" class="me-3">
    <input dTextInput style="width: 150px;margin-left: 8px"  [error]="false" placeholder='物料编码'  name="物料编码" [(ngModel)]="this.filter.ProductionNum">
    <input dTextInput style="width: 150px;margin-left: 8px"  [error]="false" placeholder='物料名称'  name="物料名称" [(ngModel)]="this.filter.ProductionName">
    <input dTextInput style="width: 150px;margin-left: 8px"  [error]="false" placeholder='工序编码'  name="工序编码" [(ngModel)]="this.filter.ProcessNum">
    <input dTextInput style="width: 150px;margin-left: 8px"  [error]="false" placeholder='工序名称'  name="工序名称" [(ngModel)]="this.filter.ProcessName">
    <div class="btn-g">
      <d-button id="primaryBtn" (click)="search()"><i class="icon icon-filter-o me-2" ></i>查询</d-button>
      <d-button bsStyle="common" style="margin-left: 8px" (click)="reset()"><i class="icon icon-refresh me-2"></i>重置</d-button>
    </div>

  </div>
  <div class="mt-3">
    <d-data-table *ngIf="displayTableData.length>0" [lazy]="true" [dataSource]="displayTableData"
       [scrollable]="true" [fixHeader]="true" [maxHeight]="tableheight" [resizeable]="true" [tableOverflowType]="'auto'" [scrollable]="true" [resizeable]="true" [colDraggable]="true" [tableWidthConfig]="tableWidthConfig">
          <thead dTableHead >
             <tr dTableRow >
                <th dHeadCell *ngFor="let colOption of dataTableOptions.columns">{{ colOption.header }}</th>
              </tr>
          </thead>
                  <tbody dTableBody>
                    <ng-template let-rowItem="rowItem" let-rowIndex="rowIndex" let-nestedIndex="nestedIndex">
                      <tr dTableRow>

                        <td dTableCell [rowItem]="rowItem"
                        [field]="'type'">
                          <span dTooltip [content]="rowItem?.jobNum">{{ rowItem?.jobNum}}</span>
                        </td>
                        <td dTableCell  [rowItem]="rowItem"
                        [field]="'type'">
                          <span dTooltip [content]="rowItem?.productNum">{{ rowItem?.productNum}}</span>
                        </td>
                        <td dTableCell  [rowItem]="rowItem"
                        [field]="'type'">
                          <span dTooltip [content]="rowItem?.productName">{{ rowItem?.productName}}</span>
                        </td>
                        <td dTableCell  [rowItem]="rowItem"
                        [field]="'type'">
                          <span dTooltip [content]="rowItem?.partType">{{ rowItem?.partType}}</span>
                        </td>

                        <td dTableCell  [rowItem]="rowItem"
                        [field]="'type'">
                          <span dTooltip [content]="rowItem?.processName">{{ rowItem?.processName}}</span>
                        </td>
                        <td dTableCell  [rowItem]="rowItem"
                        [field]="'type'">
                          <span dTooltip [content]="rowItem?.reportedAmount">{{ rowItem?.reportedAmount}}</span>
                        </td>
                        <td dTableCell  [rowItem]="rowItem"
                        [field]="'type'">
                          <span dTooltip [content]="rowItem?.qualifiedAmount">{{ rowItem?.qualifiedAmount}}</span>
                        </td>
                        <td dTableCell  [rowItem]="rowItem"
                        [field]="'type'">
                          <span dTooltip [content]="rowItem?.unqualifiedAmount">{{ rowItem?.unqualifiedAmount}}</span>
                        </td>
                        <td dTableCell  [rowItem]="rowItem"
                        [field]="'type'">
                          <span dTooltip [content]="rowItem?.scrapAmount">{{ rowItem?.scrapAmount}}</span>
                        </td>

                        <td dTableCell  [rowItem]="rowItem"
                        [field]="'type'">
                          <span dTooltip [content]="rowItem?.userName">{{ rowItem?.userName}}</span>
                        </td>
                        <td dTableCell  [rowItem]="rowItem"
                        [field]="'type'">
                          <span dTooltip [content]="rowItem?.actualTime">{{ rowItem?.actualTime}}</span>
                        </td>
                        <td dTableCell  [rowItem]="rowItem"
                        [field]="'type'">
                          <span dTooltip [content]="rowItem?.reportTime">{{ rowItem?.reportTime}}</span>
                        </td>
                        <td dTableCell  [rowItem]="rowItem"
                        [field]="'type'">
                          <span dTooltip [content]="rowItem?.note">{{rowItem?.note}}</span>
                        </td>
                      </tr>
                    </ng-template>
                  </tbody>
    </d-data-table>
    <div class="nonHistory">
      <h2 *ngIf="displayTableData.length==0">暂无报工记录</h2>
    </div>
  </div>
  <div class="page-footer" *ngIf="displayTableData.length>0">
    <d-pagination
      [size]="'sm'"
      [canViewTotal]="true"
      [canChangePageSize]="true"
      [maxItems]="5"
      [total]="this.pager.total"
      [pageSizeOptions]="this.pageSizeOptions"
      [(pageSize)]="pager.pageSize"
      [(pageIndex)]="pager.pageIndex"
      (pageIndexChange)="pageIndexChange($event)"
      (pageSizeChange)="pageSizeChange($event)"
    >
    </d-pagination>
  </div>
</div>
